import { useState } from 'react'
import {connect} from 'react-redux'
import Index from '@/pages/Index'
import Login from '@/pages/Login'
import './App.css'
function App(props) {

  const {login}=props;
  return (
    <div className="App">
      {login?<Index/>:<Login/>}
    </div>
  )
}


const mapStateToProps=(state)=>({
  login:state.login,
})
export default connect(mapStateToProps)(App)
